<template>
	<page-meta :page-style="'overflow:'+(show?'hidden':'visible')"></page-meta>
	<view class="page-index">
		<uni-popup ref="popup" :mask-click="false"  type="bottom" :safe-area='false' @touchmove.stop.prevent="" @change="change">
			<view class="center-box">
				<view v-if="Title" class="title-box">{{Title}}</view>
				<view class="text-box">
					{{Text}}
				</view>
				<view class="bottom-box">
					<view class="cancel-box" @click="close()">
						取消
					</view>
					<view class="confirm-box" @click="confirmBnt()">
						确认
					</view>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	// import * as index from '@/api/index.js'
	export default {
		name: 'entrePopup',
		props: {
			Title: String, //标题
			Text: String, //中间提示内容
		},
		data() {
			return {
				show:false
			}
		},
		created() {

		},
		mounted(){
			
		},
		methods: {
			change(e) {
				this.show = e.show
			},
			// 确定按钮
			confirmBnt() {
				this.$parent.entreBnt('我草') 
				this.$refs.popup.close()
			},
			// 打开弹窗
			open() {
				
				this.$refs.popup.open("center")
			},
			// 关闭弹窗
			close() {
				
				this.$refs.popup.close()
			}
		}
	}
</script>

<style scoped lang="scss">
	.page-index {
		.center-box {
			width: 520rpx;
			background: #FFFFFF;
			border-radius: 16rpx;
			padding-top: 50rpx;
			.title-box {
				font-size: 32rpx;
				color: #333333;
				text-align: center;
				font-weight: bold;
				padding: 0rpx 100rpx 20rpx;
				border-bottom: 1px solid #F0F0F0;
			}
			.text-box {
				font-size: 28rpx;
				color: #999;
				text-align: center;
				padding: 30rpx 100rpx 50rpx;
				border-bottom: 2rpx solid #F0F0F0;
			}
			.bottom-box {
				display: flex;
				align-items: center;
				.cancel-box {
					width: 260rpx;
					height: 95rpx;
					font-size: 32rpx;
					text-align: center;
					line-height: 95rpx;
					color: #333333;
					border-right: 2rpx solid #F0F0F0;
				}
				.confirm-box {
					width: 260rpx;
					height: 95rpx;
					background: $uni-btn-color;
					text-align: center;
					line-height: 95rpx;
					font-weight: bold;
					font-size: 32rpx;
					color: #333333;
					border-bottom-right-radius: 16rpx;
				}
			}
		}
	}
</style>
